<template>
    <div id="foods"> 

        <!-- banner -->
        <banner></banner>

        <!-- 金刚区：VajraDistrict -->
        <vajradistrict></vajradistrict>


        <!-- 新品来袭 listxplx-->
        <listxplx :listxplx_data='listxplx_data' v-on:commonId='todetail'></listxplx>
        

        <!-- 重复样式 Repeatstyle-->
        <repeatstyle :repeatstyle_data='repeatstyle_data' v-on:commonId='todetail'></repeatstyle>

        <repnnrq :repnnrq_data='repnnrq_data' v-on:commonId='todetail'></repnnrq>

        <repgrxx :repgrxx_data='repgrxx_data' v-on:commonId='todetail'></repgrxx>

        <repfxhsg :repfxhsg_data='repfxhsg_data' v-on:commonId='todetail'></repfxhsg>

        <reprxms :reprxms_data='reprxms_data' v-on:commonId='todetail'></reprxms>
      
        <replbhj :replbhj_data='replbhj_data' v-on:commonId='todetail'></replbhj>

        
    </div>
</template>

<script>
import Vue from 'vue'
import axios from 'axios'
import Banner from '@/indexfood/banner'
import Vajradistrict from '@/indexfood/vajradistrict'
import Listxplx from '@/indexfood/listxplx'
import Repeatstyle from '@/indexfood/repeatstyle'
import Repnnrq from '@/indexfood/repnnrq'
import Repgrxx from '@/indexfood/repgrxx'
import Repfxhsg from '@/indexfood/repfxhsg'
import Reprxms from '@/indexfood/reprxms'
import Replbhj from '@/indexfood/replbhj'

export default {
    methods: {
        todetail(commonId){
        this.$emit('commonId',commonId)
        }
    },
    components:{
        banner :Banner,
        vajradistrict:Vajradistrict,
        listxplx:Listxplx,
        repeatstyle:Repeatstyle,
        repnnrq:Repnnrq,
        repgrxx:Repgrxx,
        repfxhsg:Repfxhsg,
        reprxms:Reprxms,
        replbhj:Replbhj
    },

    // 代理
    data(){
        return{
            // data : "",
            listxplx_data :{},
            repeatstyle_data :{},
            repnnrq_data :{},
            repgrxx_data :{},
            repfxhsg_data :{},
            reprxms_data :{},
            replbhj_data :{}
        }
    },
    created(){
        
        axios({
            url:"/app/index/index_food",
            // params:{
            //     specialId:113
            // }
        })
        .then((data)=>{
            
            this.listxplx_data = data.data.itemList[0]
            this.repeatstyle_data = data.data.itemList[1]
            this.repnnrq_data = data.data.itemList[2]
            this.repgrxx_data = data.data.itemList[3]
            this.repfxhsg_data = data.data.itemList[4]
            this.reprxms_data = data.data.itemList[5]
            this.replbhj_data = data.data.itemList[6]

            // console.log(data.data.itemList)
            // console.log(this.repnnrq_data)
            // console.log(this.repgrxx_data)
            // console.log(this.repfxhsg_data)
            // console.log(this.reprxms_data)
            // console.log(this.replbhj_data)

        })
    }
}
</script>

<style lang='stylus'>
#foods
    padding-bottom 0.5rem
    

    



                


</style>


